import java.util.Scanner;

public class test4 {
    /*数组元素的复制
    需求:
    把一个数组中的元素复制到另一个新数组中去
     */
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入数组元素个数:");
        int n = sc.nextInt();

        int[] a = new int[n];
        int[] b = new int[n];

        System.out.println("请输入数组数据:");
        for (int i = 0; i < n; i++) {
            a[i] = sc.nextInt();
        }
        System.out.println("复制后的数组b为:");
        for (int i = 0; i < n; i++) {
            b[i] = a[i];
            System.out.print(b[i]+" ");
        }

    }
}
